package com.hc.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class SpringbootCurdDemoApplication extends SpringBootServletInitializer {

	/**
	 * source方法可以通过war启动项目
	 */
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(SpringbootCurdDemoApplication.class);
	}

	/**
	 * run方法可以通过jar启动项目
	 * @param args
	 */
	public static void main(String[] args) {
		SpringApplication.run(SpringbootCurdDemoApplication.class, args);
	}
}
